tests for RT #76884 and #75320