Issue #20866: Fixes for errors in search