schemes: correct handling for missing line spacing

(integrated from master branch change 2469fc0 by Todd Whiteman <toddw@activestate.com>)