Dimensions: Reverse a check to avoid potential reflows

Fixes #14979
Closes gh-1560
(cherry picked from commit 1ca84214cc89d9e5f8af12b18b34426fc91b1b08)

Conflicts:
	AUTHORS.txt