Better handling for special bit modes

This PR replaces the partially broken fixes from PR #9947 and #9935

Please see #9947 and particularly https://github.com/saltstack/salt/pull/9947#issuecomment-33554468 for further information.