Fix erroneous revert in D104.

The previous commit partially undid 31799240c7 by mistake. Put the changes
back.