Revert "Remove most uses of CompareInBounds
(#13244)"
#13907
Merged
CompareInBounds
(#13244)"
#13907