Conan Doyle struggled to keep his Holmes stories consistent (good luck figuring out how many Moriarty brothers there are and which one is named James)
Did he struggle, or did he just NGAF? I mean he didn't
want to keep writing them, he wanted to be writing historical fiction and other stuff like Lost World. He got so fed up he killed Holmes off, and it took him ten years to bring him back. I honestly would not be surprised if he just threw up his hands and said "Whatever! I don't care, just give me money!". As someone who is trying to be a writer, I
don't struggle to keep my stories consistent - even though for some of them I have them planned out ten books in advance - but that's when I care about the stories. If I write something I don't care about, not only is the quality worse, I certainly don't put much effort into keeping it consistent.
IMO Moriarty only has one brother, named James. I have seen fans argue he has two, because the brother is both called "Colonel" in one story and said by Holmes to work as a station master in another. I guess folks find it hard to believe an ex-army colonel would get a job as a station master (fair enough), but the context in which Holmes mentions Moriarty's brother being a station master also precludes there being a second brother. In the Valley of Fear, Holmes is trying to convince a Scotland Yard inspector that Moriarty is a crook. To do this he says the Professor has a painting worth £40k, which he obviously cannot afford on his salary. To head off the suggestion it was bought by a wealthy relative, Holmes then says that Moriarty is unmarried (so no rich wife) and his brother works as a station master (too poor to buy a £40k painting). If Moriarty had
two brothers as many fans believe, Holmes
should have mentioned him in this context, otherwise Holmes looks silly.
"Oh, the Professor is unmarried, and his brother is a mere station master. They cannot have bought him this expensive painting!"
"But Holmes, what about his
other brother, the Colonel?"
"My word, Watson, you are right! I forgot about him!"
I mean the Doyalist answer is likely that someone (an editor?) pointed out to Doyle that a relative could have bought the painting, and that Moriarty had a brother, and dismissing the brother as being too poor doesn't work quite so well for Holmes if the brother is an army colonel (ex or otherwise) so Moriarty's brother becomes a poor station master in order to prove Holmes' point that the Professor is a rich crook. But I still maintain that in the context of the scene, Moriarty must have only one brother, otherwise Holmes would have mentioned he had two, since he was trying to make a point that Moriarty didn't get the painting from a relative.
And all of this wall of text just goes to show exactly what I was saying about some fans (ie me) thinking
way too hard about these things. In my defence though I wrote two Holmes pastiche novels involving the Professor's brother as a main character, so I kinda
had to think about it. I just got around the issue by saying that the Colonel got a job as a station master as part of one of the Professor's schemes, and tied it into the Lost Special short story.