When he tells Lily his problem, she, against Marshall's advice, suggests that Ted appeal to Stuart, who gives Ted permission without a second thought.
Stuart tells Ted and Marshall that he is glad the wedding is off, and that he missed being single.