This looks like a bug in the shader compiler. XNA (as you have noted) uses an old version of the compiler. It's known to have bugs.
By the looks of it, the compiler is trying to hoist clamp into a preshader, and failing.
Probably the best solution here would be to manually hoist it yourself (this is what XNA's built-in effects do). The standard API for doing this is by overriding Effect.OnApply. Although this isn't trivial, as the content pipeline will normally give you an Effect, unless you mess around making a pipeline extension. Making your own wrapper class that does the clamping might be just as easy.
I recommend this blog postthis blog post for some more details.