Optimization including declared variables into every case only when it's
necessary.