Optimization: use Shachaf's traverseWithKey_ for Maps.