This code (actually, code very much like it) made it through development and test (in a different team; we never make mistakes,) and worked beautifully. In production, however, it was an utter failure. It isn't difficult to spot the problem; can you?
----------------------------------------------