[DROOLS-27] fix discovery of an inner class when extended by a declared type
(cherry picked from commit 37b1fd7e10113508aaa6420bb86223c285e70905)