83ad6042a7 & b267cd6fb4 Does not include test code to avoid risking merge conflicts. (cherry picked from commit 415585a30d74fcae61f581808220a7aaeca3eaf5) (cherry picked from commit e36628a6d436ea08d6d31441c101a88a5504c515)
83ad6042a7
b267cd6fb4