Unit test

Adding unit test for deep nesting problem. Fails in old version.