Fix a bug where painting on the border of a padded volume is not possible.