In kvToHash, we have self::tokensToString( $kv->v ) but
KV->V
/** @var string|Token|Token[]|KV[] */
vs
tokensToString
* @param string|Token|array<Token|string> $tokens
so any KVs found there are probably dropped since there's no condition for them in the loop.