Undo change from caad631c754c2cb424070f8ca58d9e8982f653b2 -- the problem was a misplaced debug message, not an incorrect condition/comparison.