Improve debuggability of range check failures