Fix double "injectedScreenPos : SV_Position" bug.

The WritePatches was called at each 'ret' statement, but now it's possible to return early from a shader, and thus multiple spots can occur.

This  fixes moves the WritePatches call out of opcode_ret handler to end of the routine.