Fixes #5652: Fix tests