Fix bug #9560, sporadic wrong indentation; improve instrumentation of