Revert "Some -O3 fixes"

This reverts commit c1bce7ef8a4f1b504cb4fbf61247cf8039bad554.