Handle generic dictionaries better.