fix detecting when a merge is needed.
Merge branch 'pulp-2.2' into pulp-2.3