Don't resolve nodes unless necessary
Migrate legacy switch macro to the new one.