Lol if only it were sorcery. Then maybe it would be easier to debug!
There are two issues I can think of that might be causing this:
1) Are you setting the Blockly.Python.INDENT to a string, eg ' '? The property does not support setting it to a number. From your description it doesn't sound like this is the issue but I wanted to mention it anyway.
2) Your test page isn't loading your modifications. If you do `console.log(Blockly.Python.INDENT.length)` right before generating your code, what does it output? If it outputs 2 then you might be modifying the value after the code is generated, or you might be loading the wrong file.
I hope that gives you some places to start! If you have any further questions I'm happy to help :D
--Beka