#852 Fix display for the gallery block when the query is empty