Weird behaviour when flattening generator expression with vcat

A very simple example showing this “problem”:

a = [1 , 2, 3]
g = (a[i] for i in 1:3)
a = [4, 5, 6]
collect(g)
# Gives 4, 5, 6
# Intuitively I would have expected it to give 1, 2, 3

But this is so fundamental that I would be very surprised if it wasn’t supposed to be like that?