The ``$links`` array is not keyed by the link name. The link name is in a key named 'title' or 'link_title' in each link (which is an array).