Fixed ordering of ordered relationships in rebasing. Now it should give the same order as integrating from individual events.