[FIX] XQuery, resource management (#685): check case on Linux systems