Merge "Moving rearrangementExists to ReorderLogic since it's only used there" into main