How Is LLM Reasoning Distracted by Irrelevant Context? An Analysis Using a Controlled Benchmark