[9.18] fix: usr: Fix a bug in the static-stub implementation
Static-stub addresses and addresses from other sources were being mixed together, resulting in static-stub queries going to addresses not specified in the configuration, or alternatively, static-stub addresses being used instead of the correct server addresses.
Closes #4850 (closed)
Backport of MR !9314 (merged)