[DROOLS-416] Queries do not work with events
(cherry picked from commit 8eb71d65fd03e1258c584a49229ea74644379c7b)