Reducing complexity of Rendered#process_tree