This change should be equivalent to the approach committed in rS306417, but if sed has a bug it could be exploited by the untrusted tar file. Instead, convert the expected hash list to the expected tar content filesystem layout, and compare that with find's output.