Revert incorrect optimization.

This reverts commit 7600485a5e9e501788c1c5377fad45f1d1d2ea53.