Ah yes, in your dialog the order of your speakers is wrong: the NPC should be speaker 1, and the player speaker 2. It "works" by setting the flag on the NPC because even if you declare them wrongly, the dialog will still be started with the NPC as speaker 1 and the player as speaker 2. This mismatch mainly causes problems in case of voice recording (because then the player lines would be recorded for the NPC and vice versa), and it's of course confusing when looking at the dialog.