Add test for nested rules