Centuries-old supernova guides James Webb Space Telescope through an interstellar gap