More work on issue #1582
Closes #1582