Fix https://github.com/saltstack/salt/issues/6785
Merge pull request #7183 from dlanderson/fix_issue_6785

Fix https://github.com/saltstack/salt/issues/6785