Refined _trim_blank to handle starting blanks too #612