There's indeed a problem, although it doesn't occur always. Say you have this:
PkSide: F1, A, B
FkSide: Z, Y (to A), X (to F1)*, B
This gives a problem. Not only are the fields of FkSide sorted as: X, Y, Z but the pk of PkSide is sorted as: A, F1.
So the FkSide pk can't be sorted, well, not the FK fields. They have to be sorted according to the PK Side's pk field order. Which is A, F1. , So, FkSide's PK should be: Y, X, Z, or at least have Y and X in that order, as they point to the fields in that order, but that reference is never stored in NH mapping files.
Now, the problem gets bigger when an entity Foo points to FkSide's PK. For emitting Foo's pk fields, we can't rely on FkSide's order, as that's determined from PkSide's order. We can't look at some cache, because it might be PkSide hasn't been processed yet.
It's a problem as the fields have to be grouped together but the ordering based on name might dictate differently. (in the case of Bar: A, B, C, D* where A and D are together a compound FK to a different entity.
I can't express how much I loath the system NHibernate uses for mapping this. It's solved if they allow to define the many-to-one relationship like any other relationship and thus define the PK as normal too. Because they're combined (for no reason), it's extremely complicated all of a sudden.
From what I read in your posts, you use a cache for the PK field order per entity, correct? This will indeed work till the PK side isn't emitted yet. Which can be the case, the entities are processed alphabetically.
We'll see if we can find a different ordering scheme which always works and groups fk fields together...