3162 - tange replace{} directive for ranges of lines

Since we only stop at line boundaries, replacing an 'if' will also
include the '} else {'. But not if the 'else' is on the next line.