Fix undefined behavior by unsequenced move initialization