Fix latest residence getter. Does not depend anymore on datebase sorting.