Don't use variables in resolve's switch/case. Fixes #384.
Merge pull request #433 from marco-c/optimize_resolve_switch

Don't use variables in resolve's switch/case