Remove unused variables in `compile_submatch`.

Just an minor cleanup.