[fix] Make the Dictionary a template and handle String as a typedef of std::string. Apply the use to the ListItem to handle #14546. Fixes #14546