Add a failing test for a URL helper that was broken by a6b9ea2.
Only make deeply nested routes shallow when parent is shallow

Since `:shallow` may be set at any point in the resource nesting we should
only make the new and collection routes shallow when the parent is shallow.

This is a bit of a hack but until the mapper is refactored to an object graph
instead of a hash of merged values it's the best we can do.

Fixes #14684.
Merge pull request #14684 from Futurelearn/jc-deep-nested-shallow-url-helper-bug

Add a failing test for a URL helper that was broken by a6b9ea2.