It's feels stupid even as I'm typing this mail out. But as the subject states, the 'if' body is simply not getting executed. I've tried using pdb++ to debug and every time I step in after seeing that the expression should be True, the interpreter simply jumps the code block and resumes from the enclosing loop.
I think it may be something funny with the indentation or so. Though PEP8 doesn't throw any warning or errors. I've retyped the statement again and again and I'm running out of ideas now. If anyone has time then please give it a look, https://github.com/chintak/scikit-image/blob/inpaint/skimage/inpaint/fmm.py. The if at line number 51 in fast_marching_method function.