Retain 'ua' when user specified wherever possible.

In response to rt#95796