Wrong references in `ligo info get-scope`

ligo info get-scope --with-types --display-format json on this example

let x = 42
let f x = 0
let g = x

says that the first x has no references while second x has one reference which is third x. This is incorrect, third x should be a reference of the first x not the second one