Fix rest module to reset request variables in the before hook
Merge branch 'reset-rest-variables' into 2.0