Tests for #515 changes