At the end of the episode, while at James' wedding, Marshall refers to Lily as his wife and then Ted and Robin go dance together. Ted and Robin reveal that they broke up while at Marshall and Lily's wedding during "Something Blue." Therefore, if Marshall and Lily were already married, Ted and Robin would have been broken up by then.