Auto Format with curly bracket bug

You know, it is no problem to keep nice layout manually but sometimes, e.g. after some copy & paste operations when you move a nested code block one level higher, it is much quicker and less prone to errors to use autoformat than edit many lines by hand...

Thanks.