Another slightly strange enum cast future.  If the enum declaration is
moved to the global scope or if the string type is used directly
(vs. as a type parameter), things work fine.