Adds test for #337.