Search superclasses for fields when checking generics parameters.

This fixes an issue with persistence of basic collections in superclasses.
Added a test that demonstrates the issue and proves the fix.