More fixes and tests for stock lineage and ToolBox handling.