"Think about it. The same year that Lucius meets Hermione Granger, Dobby is "accidentally" freed, who then winds up at Hogwarts. Within a year, Dobby set himself up as the only Elf to clean the Gryffindor Tower, keeping a close eye on her.