Must have been a third-party library or something that messed up Kamailio. We reinstalled the server, built a new Kamailio and the problem is totally gone. Will continue testing a few days more, but will likely just close this issue and go hide somewhere.