fixes #7009, N+1 (actually 6+1) queries in dashboard page