tagged_map: Support polymorphic values