Fixed codegen bug with union/hierarchy arg