Fixed recording of background loaded resource's dependencies so that unnecessary waits do not occur when finishing the resources.