Fix noisy codegen for flags enums that have an 'Any' value
Fix #342 and add test