fix Issue 12045 - Destructor call omitted for NRVO'd struct in exceptional case