Tests for #376