[Bug 815994] Username mapping fails in certain cases