     (print     . ,(lambda (token op) (cons 'psl-print (nth 2 op))))
     (index     . ,(lambda (token index)
                     (let ((obj (nth 0 index)))
-                      `(cdr (assq ,(nth 2 index)
+                      `(cdr (assq ,(nth 1 index)
                                   ,(if (listp obj)
                                        (nth 1 obj)
                                      obj))))))

    (pairs     pair [("," pairs) ""])
    (pair      id ":" expr)
    (object    "{" [pairs ""] "}")
    (index     [("(" expr ")") id] "\\." field)
    (message   [("(" expr ")") id] "@" [index-str field] "(" aexprs ")")
    (field   . id)
    (index-str "\\[" expr "\\]"))
  "The ParselTongue grammar.")

                      (let ((o (if (listp obj) (nth 1 obj) obj)))
                        `(funcall (cdr (assq ,f ,o)) ,o ,@args)))))
    (field     . ,(lambda (token field) `(quote ,field)))
    (index-str . ,(lambda (token index) `(intern ,(nth 1 index))))
    (by-id     . ,(lambda (token id) (cadr id))))
  "Syntax tree manipulation functions.")

(defun psl--tuck (token names)
