Thickening of viscoelastic flow in a model porous medium