Federer was starting to slip in 2007. It's not that he was past his prime, but his game was dipping a little.
He lost to Djokovic in Montreal that year? Great. He also lost to Volandri at Rome, Canas at Indian Wells and Miami, Nalbandian at both Madrid and Paris, and Gonzo at the Masters Cup in the round robin stage.