The issue was caused by the shader always applying exposure even if
it is 1. When the input image had negative values this lead to nan
values to the input of the shader which converts to the display
space.
Solved by only doing to-scene-linear transform in the shader which
does this.
Caused by 18110744a2
Pull Request: https://projects.blender.org/blender/blender/pulls/138666