Fix a trailing slash bug for `RestController`s that have a `_lookup` method.

Change-Id: Ibefa6742d0411b8cb8ae1592c8b1ca077088c5e6
Merge "Fix a trailing slash bug for `RestController`s that have a `_lookup` method."