\edef/\xdef were expanded eagerly only in the preamble: after \begin{document}
the strip pass no longer captured definitions, and capture_body_definitions had
no edef branch, so a body \edef\b{\a} stored the raw body and expanded \a later.
The body branch now calls edef_definition (which also resolves \csname), and the
strip pass leaves body edef/chardef lines to it instead of swallowing them.
A test with \begin{document} defines a=one, \edef b={\a}, redefines a=two and
expects "one and two"; the existing preamble edef/xdef tests still pass.