> > Yes I'm sure. > Yeah, you are right. But this is a LyX bug. It should use a not-so-obvious name for the command to prevent a conflict like this. However, the command \subref is defined by LyX only when you use the <Formatted reference>. Since I don't use this type of cross-reference, there is no problem with my ERT.
I'll create a ticket for this. Cheers, --- Diego Queiroz