Fix the use of Providers with circular/hierarchical references. Closes #119.