Fixed #5386 (ast: hang when code is 'for (T a : b)')