This isn't a bug because chains are selected in terms of cumulative difficulty not length of chain. Very quickly a node can distinguish the real chain from the fakes.
Aha! This was the information that I wanted. Thank you.
The fact that such an obvious and simple attack has never happened suggests it can't happen. Shouldn't you realize that?