Set the dv:deliver keyword :keep-clos to t to keep the code needed for dynamic redefinition in the image.
dv:deliver
:keep-clos
t