Ok, I found the problem (I think). LyX makes an error importing the raw
LaTeX. (I pasted your code into an algorithm the first time, which is
why it worked for me.)
-----------------------------------------------------
LaTeX Error: Something's wrong--perhaps a missing item.
...uclid} \begin{algorithmic}{[}1] \Procedure
{Euclid}{$a,b$}\Comment{The
Note the braces around the left bracket in the optional argument [1].
You can correct this by deleting [1], then clicking on the ERT inset
containing \begin{algorithmic} and inserting the [1] into the inset.
Oddly enough, if you type a left bracket anywhere inside the float, LyX
surrounds it with braces. I don't know why it does that, but I can't
imagine it's a good idea.
Seems to me we might have two separate bugs here: (1) not putting the
optional argument [1] inside the ERT with the \begin{algorithmic}
command; and (2) putting braces around all left brackets. You might
want to file bug reports on these.
/Paul