issue-799

This PR is targeted at the 0.16.1 tag, but can be applied cleanly to master as well.  I wanted to have the ability to launch a bugfix 0.16.2 release that's not gated on the large number of changes in master.

Fixes #799