Recognize existing indentation when indenting close braces

this PR addresses #8395 and is a 2nd attempt.  I refactored my fix based on feedback from @peterflynn and @redmunds in #8426