[Ide] Fixed multiple iterations over an enumerable