This fix prevents tests incorrectly reporting dangling resources. It is not sufficient to check just whether or not an error occurred when iterating over the listed resources - checking the bool returned is also required.