consider the following XQuery:
123456789012345678901234567890 instance of xs:integer
It evaluates to false. And indeed the plan looks as follows:
A known issue?
This is fixed in 8.1, which is due any day now.
I wasn't aware of it as a specific bug, but I did spot a few loose ends in the handling of large integers.