ncm-spma functions: fix test for an explicitly defined package version

Annoying bug discovered when starting to make real use of these rewritten functions.
In fact I don't know how to rephrase it. This is not a new behaviour but the intended one as said in the comment (that was already there). The only intent (almost the main reason for the function) is to forbid replacing a package with a locked version by an unlocked version (it is still possible to replace it by another locked version).