More tpl changes to match recent master updates.