Small tweak to brace closing logic to make it more consistent