fixes n+1 queries in MediaRepository.PerformGetAll