avoid many queries when only one entity is rendered

(Fix regression)