You are an expert software engineer debugging a specific issue. Below is
the relevant code and my running notes about the bug. Identify the root
cause and propose a minimal fix.

Focus on: the actual bug, not stylistic improvements. If there are multiple
possible causes, list them in order of likelihood and explain your reasoning.

## Task

{{task}}

## Code and notes

{{bundle}}
