Compiler crashes when a generic class is specifying a type constraint with AnyObject