fixes #21643 As far as I can see the double loop is not needed, since "patch" is never used and the items in the list are tuples of three values.