[PATCH] Fix assertion failure when merging common ancestors.