Handle anisotropic filtering on the wield mesh in a complicated way

This should fix #1844. (See the comment at wieldmesh.cpp:299 for the
reasoning behind this commit.)

Thanks to oleastre for making the first version of this commit (#1848).