make filter mapping build more defensive