FileMaker isn't matching up the data references by name in this case, it's matching them up by the ID numbers assigned when the fields, tables and table occurrences assigned when those objects are created. So you'll need to be very careful in how you add those fields to the data file before setting up the UI file to refer to them on a layout, script or relationship.
Further to what Phil said, and in response to your final question - yes, the order you create fields does matter.
I discovered this myself when I was working on a test copy of our production database. I got everything working the way I wanted, but then when I went to work on our production database, I must have created the fields in a different order and so when I copied and pasted script steps and/or layout objects from the test database into the production database, the field references did not match.