[mcs] Adds handling for declared variables from while loop condition