[refinement] BUGFIX: set up approprate bounds of the array passed to refinement checking routine
Merge commit 'e027e8a'; commit '4b4e20d' into upgrade_refinement_criteria