Hotfix for #194

I guess there are more sophisticated ways for this. Maybe we could even consider to make this optional (although I don't really think that that's neccessary) but those few lines reduced the queries by a tenth in our application, so I guess this is really necessary.