Fixed #173: allow modules as generic type arguments
Fixed #174: Wrong error message when instantiating an abstract class