Revert sanity check, restoring optimization

This reverts commit a1f5c8c86fb43bab0f426de845a5888a36c022a2.