File handle leaks in Query

 - https://issues.jboss.org/browse/ISPN-3360
 - https://issues.jboss.org/browse/ISPN-3416