Closes a loophole in the REST interface.
Adds better assertion failure messages.