Issue #540 completed. Bug in issue #538 fixed.