When queries are repeated, a method was supposed to be called in order to check for prepared queries. This method did not exist. Which did not help.
This is the initial import based on a few files I had around.