Regression test for #42.

This is somewhat redundant, assuming const support is tested properly elsewhere.