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

Backport of #9647 

@PVince81 @icewind1991