Improve boolean handling in snapshot/restore request parsing

Fixes #4949