Handle local enum types too.

Thanks to John McCall for pointing this out.