Selection code relies on being able to set the depth functions however passes have their own depth settings. Add DRW_state_lock to ignore passes settings for particular flags. This fixes occlusion queries cycling through objects under the cursor.