Future-proof against potential Prelude.foldl' (backport #8960) (#9265)