Correctly handle the absence of one version of in a merge

Closes #1217.

If there is no version 1, then the version 2 come first, so we cannot access version by absolute position.