Fix erroneous call to check() method. That is issues was not find by cppcheck itself, so #6109 has been created