Fix regression which was introduced by 89a7cb8e710952e76a3a09b113fcb6ebe17acb12

Related to [#2060]