resource loop detection