Noticed while investigating issue 2718 that the typechecker allowed some non-instantiable types involving classes. This wasn't the root of 2718, but fixed it anyway.