Tests: added testcoverage for #1062.