Yet another resubmission of pull request #1779

Yet another resubmission of pull request #1779. Hopefully it will submit against the "post-2.4" branch as intended.
Merge pull request #1790 from hdrlab/patch-5

Yet another resubmission of pull request #1779