Fixing `hypermedia()` when URI has a trailing slash and is a collection, adding a test