Carry the accumulator through the foldl correctly

BugzID: 24365