List%invlist(x,y) only initialized in portion of allocated space
List%invlist(x,y) is not initialized in its whole allocated space, but only in the subset that gets reached directly by Latt%list. Which for a not tilted lattice is for x in [-(L1-1)/2,L1/2] and y in [-(L2-1)/2,L2/2]. I guess one should also initialize the rest of invlist.