Check if the relationship is already loaded

Right now, the problem is that the relations are queried each time they are requested. This fixes it, and in case the relationship is already loaded, it is returned from `relations` array.