Improved indentation finding logic.