Filter out images that don't need to be included
We're in the non-Nil branch of the match, so we definitely have histograms at the point where we're asking for the head of the list.
We're in the non-Nil branch of the match, so we definitely have histograms at the point where we're asking for the head of the list. Also, messing with the map instead of match thing messes up the types for reasons that I disagree with, so suppressing.