OK, that’s a good story, my heart is moved. For future reference though, please read this:
I took a different approach that looks better though could be improved. The original code was wrong all this time and nobody noticed! I’m busy with another project so may well have missed something else in this quickie fix.