Unique constraints use dependent reordering.
Minor fixes to session.