Maintain the same depth when moving left and right in AST