This bug prevents you being able to use the selecteditem command while holding an item in your offhand. I get that you technically are selecting two items with one in your offhand, but it is a selected slot nonetheless.
Steps to re-create:
Repeat command block with /testfor @a {SelectedItem:{id:minecraft:stick}}
place a stick in your hotbar put it in your off-hand
it does not detect you selecting that item.
See MC-83992, the offhand slot number is
-106b
So what you can do is: