This problem with If and a false condition looks like a bug in the calculator. Indeed after testing with one extra blank line before End of the For-lus, and normal fast result, it seems that the problem is that there's an End immediately after the If-condition.
Code Timings / Discussion
This is the discussion related to the wiki page Code Timings.