An analysis found people who had brain injuries were 24% more likely to be diagnosed with dementia.