[FIX] XQuery, random:integer(): return 0 for invalid values. Closes #671