Looks like something which should be fixed in the normaliser. But if the current design will be used, I suggest flipping the bool's meaning, i.e. initialise it to `true` if appending a RET may be necessary, and clear it when a RET is found. That would remove any need to change the DXIL patches to disable this fix.