Fixing a bug in extractBoundaryRoots@chebtech.

Closing #1021.