Add more tests for deeply nested cases