I have some alignment problems in the algorithmic environment when I use the
hyperref package. I like to have my comments left-aligned which I achieve
by \renewcommand{\algorithmiccomment}[1]{\hfill(#1)} in the preamble.
It turns out that comments on lines before \ENDFOR or anline break
(which I use to identify different blocks of code) are a bit misaligned.
Here is a MWE:

\documentclass{article}
\usepackage{algorithmic}
\renewcommand{\algorithmiccomment}[1]{\hfill(#1)}
\usepackage{hyperref}
\begin{document}
\begin{algorithmic}
\STATE foo
\COMMENT{bar}
\FOR{foo}
\STATE foo
\COMMENT{bar}
\STATE foo
\COMMENT{bar}
\ENDFOR
\STATE foo
\COMMENT{bar}
\STATE foo
\COMMENT{bar} \\[0.5em]
\STATE foo
\COMMENT{bar}
\RETURN foo
\COMMENT{bar}
\end{algorithmic}
\end{document}
Please comment \usepackage{hyperref} to have the desired output:

My guess is some weird interaction between \end{list} which is used by
algorithmic and hyperref, but I'm kind of stuck now. Do you have any
suggestion?
