t6301: new tests of for-each-ref error handling