This seems intuitively incorrect especially if insomnia is linked "with illnesses such as dementia and depression".
If they are controlling for these "confounding factors", it's highly possible that they're just eliminating the side effects of insomnia that result in an early death. It would be intuitive that someone that suffers from insomnia but suffers none of the major side effects probably wouldn't have a higher mortality rate. If they remove these controls, the results might look very different. If anyone can find the full text of the study, it'd be nice to look at.
This also flies in the face of things like Fatal Familial Insomnia and Sporadic Fatal Insomnia where patients soon die after suffering though months and months of insomnia[0].