Adds test for #612.