Fixed issues with complex conditionals when they are compiled repeatedly
and caches are enabled