Check MachineInstr::isDebugValue for the same instruction as we're
calling isSchedBoundary, avoiding the possibility of dereferencing
end().
It's possible that instead the loop here should check for I==RegionEnd
and continue to use I->isDebugValue() (instead of std::prev(I)), but I
doubt it.
This is trigged by a huge number of tests, but they happen to magically
pass right now. I found this because WIP patches for PR26753 convert
them into crashes.