Fixed bugs with if statements inside while

Before the endif would always set ignoreline to true, regardless of if
there was actually an IF statement that ran before it.  Now IF pushes a
location to a stack, and endif checks if that stack is empty, changes
ignoreline if it isn't along with popping that statement.