Update to v3.1.7 (see changelog for details)