Search not working even for unprotected content

On my backoffice, I get results from the Examine Management → External Index but no results when I search on my website.

On the folder MiscPageElements/SearchResults, if I comment the following line of code, it works.

I have all pages protected (password required) but even if I remove the protection, the search does not work.

 //Protected content is hidden by default unless displayeProtectedContent is true
        if(!Model.Value<bool>("displayProtectedContent"))
        {
            criteria.Not().Field(USNConstants.IsProtectedExamineField, "true");
        }

This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/113659-search-not-working-even-for-unprotected-content