(Contributed by Sunil G via Daniel Templeton) (cherry picked from commit 679f99b1455a1fcd785aef8ddc705f63cf0e6518)