I've confirmed this. Should be logged as a bug.

Vanilla 6.31 on XP, the inbuilt "Invisible mode" option gets sent after the ON CONNECT has begun, thus allowing for this sort of issue.

Yes, it's minor, but should be addressed.

The "Invisible mode" option should send it's command prior to triggering ON CONNECT in my opinion.