What makes LLMs self-attribute consciousness in some situations but not others — and where in training does it change?