Fix for #1144; $caneditdomain get lost when security_questions are necessary