I liked your summary of the issue, however there is a difference when a court rejects a law and the sheriff rejects a law. According to legal theory (beginning in Marbury v. Madison) the court doesn't refuse to "enforce" an unconstitutional law; it nullifies it due to a concept known as judicial review. Under judicial review, if a law fails to pass the requirements in the constitution, they actually strike the law from the legal code.
When an officer refuses to enforce a certain part of the legal code (for example, not issuing a traffic ticket), it is done so at his/her discretion. When an officer declines to enforce the law, the law is still valid and can be enforced by other officers, unlike when the courts nullify the law entirely.