Found it.
I had:
Code:
Model * model = (Model *) model;
instead of
Code:
Model * model = (Model *) _model;
Not sure how this compiles, but
Code:
Model * wibble = (Model *) wibble;
also compiles, and wibble definitely doesn't exist anywhere else in my code.
I think the best thing for me to do is to rework my variable naming to make this less likely to happen again.
Edit:
Code:
Model * wobble = wobble;
also compiles, so I assume there's part of the language standard I don't understand.