[testsuite] Fix testsuite: broken due to changed filter and fold-left functions.