waitFor: catch circular dependencies