ensure account code is not overwritten when none is supplied (bug #4743)