COMP: Fix crash in image statistics when selection changed from a 3D+t image to a 3D image.
Merge branch 'bug-18444-CrashOn4DTo3DImageSelectionChangeWithTGreaterOne'