Thanks for providing an example. (You could also have attached the .lyx file). I must confess I hadn't noticed that you posted in the LyX forum, otherwise I would have suggested so in my earlier answer.
Anyway, the code responsible for the unwanted behaviour is the following: