Need to test what happens with redirects, or with references files with URIs that aren't exactly the same (do scripts run twice?).