>  The logic of that case still escapes me.

Do you mean why it needs to be done, or how that line of code actually works?