Changing is attribute test rewritten without internal loop