Fixed tests broken by the changes of issue 5507