Compare patchlevels numerically rather than lexically

Fixes #32960.