This reverts commit e76874f513. This slows down some ops that were much faster before; will use another approach.
e76874f513