That's the good path. The code related to the bad path is some lines below (in 0.5.23c it starts from line 1781).
I am an idiot, didn't know there was more than one. That solved it, appreciate the help :)
You're welcome.
This bug is very rarely mentioned. Either the conditions are quite strict or most players have a kind heart. Or maybe they just want to enslave Melissa. :P