[high] Bug in last common determination

I think I solved this bug, it turns out that the DatabaseBranch actually never returns the first item when iterating backwards. After changing this the test still did not pass and I think this is because the expected results are wrong. As far as I understand it there is no conflict (A is just further along) so (A2) should win. I don't have a grip on this though, so if I did something weird there I would really appreciate any explanation you could give me/point me towards.