Implement "remove pattern from tree"