Bug "Invalid argument supplied for foreach()" resolved in the method replace in the class Set.