Merge "Improve error line number detection to use upstream method." into main