fix handling of empty string enums

This ought to fix #372.