Icehouse sync

Backport of Icehouse related patches from master.