checking cyclic dependencies in require

This check was done for an internal POC