Fix a bug in REST when allowed_methods is defined when method is OPTIONS