Add workaround for dump Doctrine entities when running under midgard-portable