Ignore prerelease versions if possible, fixes #1017