This does not seem right. Can the visit function for declaration take care of this?