Correctly handle the absence of one version of in a merge

Closes #1217.