Tests for #8601