Tests for #82.
Fixes #82.