[DROOLS-561] test case reproducing a NPE when having a shared query node