Only used the cached transformed query if the original one is not dirty
A change that I might revert later: making comparissons expression
objects instead of compiling them right away