This reverts commit 3c0b3250, (along with ea795304 and bb39eb9e) since it breaks test with UB sanitizer.