Fix incorrect inheritance loop warning in some rare cases with generics, closes #281

A bit annoying to add a property to ClassModel just for that issue - or would that be useful otherwise?