Get rid of calls to asTypeOf.
Another fix for UHC.