Merge "Persists restrictions in XML before marking user creation completed" into main