Add test and close #8893