caos.backends.pgsql: Fix an edge case in rebase handling logic
caos.backends.pgsql: Fix an edge case in rebase handling logic

Rebase (A, B) -> (A) did not work properly

edgedb/edgedb,edgedb/edgedb,edgedb/edgedb