Merge in upstream fixes
Hold back putting templates on comdat until mark_needed usage is done in a smarter way