Fixed template bracket linkage in while loop simplification

Ran AStyle