ok i've just done a quick test and it's working the way it should...

looking at that part your code you haven't set the flag to on anywhere
Code:
	set(me,invincible); //turns on
	reset(me,invincible); //turns off