As you can see default method of reassigning maximum is limited by max value from current iteration (see left text-window)
Writing max value outside the loop and bringing it back through Set/Get Attribute (see right text-window) is working but it's bulky when needed more Subprograms to copy.