On my system, compiling dde_linux fails with `-Werror=use-after-free`. Backport the fix from mainline to get rid of the issue. Fixes #4740