Your data should fail with :
Rendering SLS 'base:so' failed: Jinja variable 'dict object' has no attribute 'empty_password'
The error that you’re seeing is probably because of non-existing pillar data.
You've pasted full pillar data but left XXXXXXX in state file.
Try using this
{% set users = salt['pillar.get']('users') %}
Or
check if you use pillarenv, then remember to pass the correct one, you can simply verify this in command line:
salt 'your minion' pillar.get users
If it doesn't return your dictionary then try:
salt 'your minion' pillar.get users pillarenv=your_pillar_env
or
It could be a user the pillar configuration was not formed properly
Removed the first line "{% set users = salt['pillar.get']('XXXXXXX') %}"
It wont use pillar.get
This should work fine