WL-2904 Fix for writing out the wrong value.

We were writing out the username twice rather than the department the second time.