Fixed gcc internal compiler error caused by emplace_back