v3d: Avoid assertion failures when removing end-of-shader instructions.