Fix #116

Tests to demonstrate issue #116, and a fix.