Fix #796: Improve error messages for bad js.Any hierarchy