detect circular dependency, resolve value as 0