Catch an edge case in RestController routing and properly return an HTTP 400.

Change-Id: I0e57cf719a2c3372ebc61efe71a832b0482a0a3e