Fix up tests for #1159.

This replaces #1159.