Fix issue with calculation of component index (scan.go l67)