Allow caller to define recursion behavior on deep_reshape's source and update tests.