Manually handle generated types containing references to opaques