Add debug check outside of the loop in hpa_alloc_batch.

This optimizes the whole loop away for non-debug builds.
1 file changed