#126087 by gwen: performance improvement by skipping buddylist queries when not needed