More compiler optimizations to entity predicate clause compilation