Does this technique limit the LLM to correctness-preserving transforms?

Like all things related to LLMs, semantic correctness is left as an exercise for the reader.