fix bug 1048407: ensure the repository detail loads before the resultset...

this code is a bit foggy to me... maybe we can chat about it? I don't understand why we are using $q.all here :worried: