'Compare' showing incorrect data

Created by: pb30

Tested with repo https://github.com/pb30/pb-test on 'stable' (95b7987d)

When trying to compare branches after the parent branch has advanced, incorrect commits/diffs are displayed

On GitHub comparing master...branch shows the correct commits and diffs from the branch: https://github.com/pb30/pb-test/compare/master...branch

5a020365 branch1 commit
0209929e branch2 commit
96b576d5 Merge branch 'master' into branch

On GitLab comparing master...branch shows commits on master:

93321fc9eaa master5 after merge