Oh, that implementation is inaccurate. In fact it's not linked anyhow with `root_element` which can introduce situation where `root_element` is stale, but script commands are executed. More correct way to cope with that case would be to use `return arguments[0].%s' % attr, root_element`