Fix #4

Added extra unit tests to test circular references and prevent `StackOverflowException`