Fix for issue #1795.