sometimes, and I suspect this is the case here, a problem is unable to be spotted (directly identified), yet a small re-arrangement of the code is sufficient to remove the problem.