Don't apply flatten unless there are 4 image bands