Revert "Remove API hack, no longer required."

This reverts commit 354a7822f28685b776d6076ef7b4cbce4a8fec50, which was
incorrectly applied.  This patch is definitely required.