Issue #292: proposed fix and test
Issue #292: final bugfix