Hi Jose,

Yeah I can reproduce it with your code example.

Not seeing anything wrong at your code.
The code collapse logic appears to work correctly as well, so it appears to be specifically in the reindenting logic somewhere.
Will have to debug it later to see what happens once I get a bit more time.

Logged at: