2547: better logic for selecting the initial reference language