Allow prerelease parts with digits and nondigits

Previously the constraint solver crashed on such things.

Fixes #3147.