Make foldl() more efficient for non-sliced vectors