Fixed an issue with merge op working incorrectly.

Merge was working more like rebase, instead of doing a 3-way merge similar to git.