The DO 240 and DO 470 loops of the code have a lower limit of I2 + KA. However I find that the smallest index element of RWORKthat is set is J2-M meaning that the lower limit should be such thatJ-KA-M = J2-M => J=J2+KA.

I have substituted J2+KA for I2+KA in the two loops and find that the routinepasses all our tests.