Strip leading/trailing newlines on list of headers for addition; bug 884.