Take multiple direction buttons into account when changing sets.

Related to issue #153.