Start fixing remaining issues with managed types.

In particular, keep the managed bit in the Type objects.