Static methods do not type check generic parameters properly