Fix switch encoding parameter indexing when converting switch inputs to assignments,

Fixes #80