Smaller operations often are less likely to exchange or mix parts as only one locomotive is worked on at a time. Unless, they go out the side door and take a part that fits from an out-of-service locomotive.
The exception to this this being an operation with a seasonal shut down when work on all of the locomotives is performed at one time. This is undoubtedly the reason that the GLENBROOK at NSRM has parts with the Baldwin class numbers of its two sisters.
Larger operations would often have engines of the same class being worked upon at one time. If a boiler upgrade is going on then the boiler might be separated from the frame then for reassembly the railroad might try to match boiler to frame. But, if they are concerned about getting locomotives out of the shop as quick as possible, the first boiler completed is placed on the first frame available.
A number of railroads (including those in England) kept the assigned number with the frame instead of with the boiler, The Brits are said to have had extra boilers to enable quick shop turn around.
BN.