Fixing bug 1215, duplicate user throws incorrect error