Backport 1.8 3766

Bento build fixes.