[#841] More -O3 fixes