When encountering multiple non-contributing commits included in a merge
that is TREESAME to the existing contents, ensure a list of all commits
being brought in by that merge are included in the list to be pruned
from history.
Change-Id: I643e0923f8967f9b70d10b8796688b782681bfe0
Closes-Bug: #1648029