I agree, but it's not like Ted knows at the time that he's never going to end up with Robin. Even though it's very unlikely, he still hadn't ruled it out at the time. I really thought he let go of her after that touching scene in The Final Page, but sadly he hasn't.