issue #21289: Fix a multitude of problems that prevented personal privil...

...eges from working correctly.