Solving problem with internal classes

This is my fix, first commit will introduce a test to reproduce the error, the second one will be the fix for it.
Maybe you should also check that annotations were discovered as well. That would prove that only build-in classes in inheritance chain are skipped.