Re-apply 56835 along with header file changes.