Issue #3491543: Catch new BadRequestException in Router::match() and re-throw as ResourceNotFoundException
Closes #3491543