Merge internal changes.

Includes some changes to MapBinder (for #875), and an internally-committed version of #872.