Bug 18501: (follow-up) Do not rely on userenv->{branchcode}