container.directory: move refilter() to the right place