Fix issue #8580
More tests