Some hacky patches to fix TFS #1069492