Fix to allow declaration of variables inside the 'condition' part of while statements; added a test case for it