Since this is a custom development in a user-exit, the best advice I can give you is to debug the code, put a breakpoint in the user-exit, and try it out in both cases and see why it works in one case and not in the other.
There must be some point at which the process goes in different directions, you need to find that and see what's the cause, by debugging.