make detection of abstract classes lazy to fix circular type issue