The Language Reference Manual (LRM) shall contain a requirement that the API must preserve the order of all record_declaration within one file when iterating over that file.
I did not find any such requirement. However, the implementation does keep the order, and it is a key feature of TRLC. So this is a bug in the LRM.