In an ideal world latex-ing this document

```
\documentclass{article}
\usepackage{tikz}
\begin{document}
  \pgfkeys{/a/.code=(a)}
  \pgfkeys{/a}
  \def\b{\pgfkeys{/a}}
  \b
  \edef\c{\pgfkeys{/a}}
  \c
\end{document}

```

would create a document containg "(a)(a)(a)"... but in the real world
the line "\edef\c{\pgfkeys{/a}}" puts PGF in a loop, and if I
interrupt pdflatex or lualatex with a C-c I get this message:

```
! Interruption.
\pgfkeys@parse ...uturelet \pgfkeys@possiblerelax 
                                                  \pgfkeys@parse@main 
l.33 \edef\c{\pgfkeys{/a}
                       }
? 

```

What is the recommended workaround?

Note: this is a minimal version of this other question: [How do I send the result of \pgfkeys to Lua?](https://stackoverflow.com/questions/74260021/how-do-i-send-the-result-of-pgfkeys-to-lua)