My solution was to remove the default value of userName() on the field. And instead set the value for the field on form load behavior rules. Then remove all rules to clear this field when form is submitted.
I think I had too many rules of the same sort conflicting with each other and it just got confused!
It's so simple this way and works as it should.