visitor: Make sure to visit replaced nodes