add test cases for issues 10497 and 10793
Merge pull request #2466 from hpohl/10793

add test cases for issues 10497 and 10793