Whether it was accidental or a fluke of comic book art. Issue 32 of Wolverine and the X-Men clearly shows what looks to be the 4th Doctor passing through or making an exit during a battle. It is true that Marvel Comics did once hold the license to Tom Baker’s 4th Doctor in the Marvel Universe.
Doctor Who entered the Marvel Universe in within the pages of Marvel Premiere #57 in 1980, with a cover by Walter Simonson, and penciled by Dave Gibbons. Currently IDW Publishing owns the comic book rights to just about all the Doctor Who titles. Maybe this was just a nod from Nick Bradshaw current artist on Wolverine and the X-Men to a friend at IDW or on the set of the Doctor Who television series?
For whatever reason the Doctor made a visit, the Marvel Universe has billions of characters and the Doctor travels from universe to universe, maybe he was just visiting old friends?