[DROOLS-363] make incremental compilation to work with declared types