I advanced a little bit in the debugging, but I still can’t figure this out.
I have here my 3 layers. The two that look black and white cannot compute histogram. The one that looks good, can.
However, not only the computation for each band was done using the same logic, but if you use Pixel Info you can see that images that look like masks they actually have valid values.