It seems to be a universal truth on this forum that whenever anyone describes the behavior of anything as weird in a post's title it turns out to be anything but and is just what is going to happen.
In your case have a look at that button, people have been known to have them rotated by 90 degrees and thus having a permanent short between the two contacts that they think is a switch.
Can you explain a bit better what you mean by this.
Personally I would never connect a button like this. I would connect it between the input and ground and have the resistor go from the input to +5. Then invert the sense of the if statements.