Fixes https://github.com/intridea/grape/issues/825.

See https://github.com/intridea/grape/issues/825 for an explanation.