Spent some time bug hunting. Identified which variable was causing an observed problem in one very specific situation, failed to find where that was getting set to the obviously wrong value (based on the code there should only be 2 possibilities here and it doesn't seem to be either of them), so I put in a thing to check for the wrongness and when that exists it tries to get at the correct value in a slightly more expensive way. I hate that "solution" and left myself a note to try harder later.