[FIX] XQuery, QT3TS: improved detection of integer limits