MADS: Add guard against reading depth value outside bounds of depth surface