Polypharmacy is associated with functional decline in Alzheimer's disease and Lewy body dementia.