Fix NPE in capabilities conflict resolution It is possible that a large dependency graph resolves capabilities conflicts 2 by 2, at different "depth" in the transitive graph. In this case, it is possible for a module to be selected, but then it needs to be considered again when a new module providing the same capability appears in the graph. If not, we wouldn't choose any version, producing an NPE when we read the graph back from the binary store.
The error was discovered during dogfooding, so this commit is a pre-requisite to using capabilities in the Gradle build (will require a wrapper update).
This commit also improves the selection reason in case of capability conflict resolution, to make it clear it was upgraded to the latest version.