Fix bug in squares refinement in adaptive integration.