Consistency in Context-Aware Behavior: a Model Checking Approach