Do not move loads out of the loop unless the memory is readonly. Fixes https://github.com/KhronosGroup/SPIRV-Tools/issues/5075