revert merge of PR#928 to master, which broke on non-snapshot

This reverts commit bc5afbed5c504c0040ece611799ae3f44a11c9ff, reversing
changes made to 7457758fbb609858c4e21f1f9f9b8c79d6c39bf7.