While updating from libvips v8.16 to v8.17 one of our tests found a regression for a PNG (DisplayP3) to JPEG conversion. **To Reproduce** ``` vips copy display_p3.png 817.jpeg ``` [display_p3.png](https://github.com/user-attachments/assets/76fc107f-593a-44f3-ac43-18756d184581) **v8.16.1:** <img src="https://github.com/user-attachments/assets/dab15e03-7c42-4273-84cb-95347ffebf0a" width="200" /> **v8.17:** <img src="https://github.com/user-attachments/assets/1addae27-4be6-4651-9da2-a107fe6bad80" width="200" />