Avoid NPE
Fixes filtering classes according to "extending" setting
Merge remote-tracking branch 'laurentmartelli/master'