Regression introduced in43e231c. Thanks to @yanbe for pointing out issue in https://github.com/espressif/esp-idf/pull/955 This is a different fix, tries to keep the behaviour that43e231cwas aiming to correct (unnecessarily testing an invalid slot more than once.)