AFAIK those are all added during semantic on the return statement.  This problem only occurs for conversions that do not require a cast on the return statement, such as inout -> whatever, which _must_ happen on the caller side.