core/operation: fixed bug where an allocation could have a dependency on itself