Fix test for #13937 ticket. Close gh-1299
(cherry picked from commit 308980ee2a5c85ba1600446d093edc921f9a71de)