fix variable tree get_attribute behavior