Fix: allow rest_client functions in onreply_route

Credits to Jayesh Nambiar for reporting
(cherry picked from commit 6f048e038c4ae6e3e620d1b5f17cf1880fdef246)