A Java function that returns a result set that was generated using the provided connection could cause an internal error in some cases. Now such result sets are copied early on.