filter-branch: fix variable export logic