Add a test for the fix in bf3275773e6bb6a5c360d1aa8f66258c5131c7d7.

Resolves #534.