Fixes bug #22254.