DROOLS-573: fixing bug. Adding test case.