Issue #3415582 by nico.b, larowlan, Matt B: Unhandled exception when trying to register a duplicate username with different case (cherry picked from commit ce9ec037)