Merge upstream revisions 12615-12628 except for a loadtextures change which I need to review against the change I already made
Fix warning introduced in upstream merge