soulitzer:

Does this resolve your issue?


That idea also came to my mind, about the multiplication by 10. I think it will resolve it.
As an alternative, suppose mod is a model with environment where I can save a counter, which role is to determine the number of the visit through the backward through this one layer.
So using this counter as an indicator with an if statement what to do when the hook called:
If it is the first visit (there is a deterministic definite order of the backwards because of the forwards sequence) I need to divide it by 10, if it is the second visit, I should do nothing (just zero the the counter for the next forward and backward iteration), did you get my suggestion and its logic by that way?
That’s how I can avoid the multiplication on the second output, although in that solution my hook will be on the parameters of the module and not on the output (where the problem is the distinction between the two visits through backward function which I think can be resolved by a simple counter).
But this solution with division and then a correction by multiplication should do the job I think, that’s good also and maybe even more simple.