Allow constraint solver to work with versions of type "1.2.3+local"

Also prevent it from infinite looping