fixes #23: support circular dependencies