longtable need not be (and as you discovered should not be) nested inside a table environment.
To quote the page 1 of the excellent documentation
The longtable package defines a new environment, longtable, which has most of the features of the tabular environment, but produces tables which may be broken
by TeX's standard page-breaking algorithm. It also shares some features with
the table environment. In particular it uses the same counter, table, and has a
similar \caption command. Also, the standard \listoftables command lists
tables produced by either the table or longtable environments.
That means that for most intents and purposes longtable has its own table environment already built in.
If a longtable is nested in a table the table counter is stepped up twice (and maybe other even worse things happen...).
\documentclass{report}
\usepackage{longtable}
\begin{document}
See \ref{tab:results}~tab and \ref{tab:moreresults}~tab.
\begin{longtable}{lr}
\caption{Results}\label{tab:results}\\*
A & B \\
\end{longtable}
\begin{longtable}{lr}
\caption{More results}\label{tab:moreresults}\\*
C & D \\
\end{longtable}
\end{document}
should do the right thing.

That means that longtables can't easily float, but that is probably for the better.
Note the \\* (or \\) after the \caption, which are usually not needed in a table. See also how to have a caption on top of longtable?.
edit Changed to \\* after \caption in light of page split between longtable caption and table
longtablecomes with its owntableenvironment and therefore should not be wrapped into\begin{table}...\end{table}. See https://tex.stackexchange.com/q/219138/35864 on how to use it with a caption. – moewe Feb 18 '19 at 11:06