Backport WELD-1020 & WELD-1415 to 1.1