Fix running tests for autoloaded classes(cherry picked from commit 689f91f6bc50bb3c1be4631fb4214690d0b598de)
Merge pull request #1362 from dracony/4.1

Fixes skipping of parent classes
Merge branch '4.1' into 4.2