[stable6] Add unit test for multi-user configuration loading

Backport of #9647 

~~Will fail until #9109 is merged~~
Would have failed until #9635 was merged

@PVince81 @icewind1991