Improve error message for bounds of multi-dimensional arrays