You are correct - the problem is most likely the unmatched versions - since each new version of Mame released will have some changes to the romset ( ie. some roms are renamed, new more accurate dumps for some of the files may replace older or missing dumps, the layout of the files inside the zip may change (ie. sound files may be removed from the rom package and separated to their own machine named zip, etc.) any of these types of changes will change the way the rom package works and result in it not working with a different version that does not match exactly - so the more versions between the romset and the mame version the more the chance that specific roms will no longer work.
Now knowing that the hard part is finding a matching set -- unfortunately finding a specific romset is sometimes difficult since torrents become inactive fairly quickly as seeds drop that version and move to the new releases so actually getting a 0.171 set becomes more difficult as time passes and new releases are made - so you have a couple choices
1. Spend the time and get lucky and find an active download for the version you need
2. Find a version close to the version you need and then find the update packs from that version to the one you actually wanted and update from the found version to the one you wanted incrementally
3. Get the latest version and update your Mame version also
4. Get the latest version and the Roll back romset to match and use that to rollback the latest version to the one you wanted.
Which method is easiest depends on what versions you find and how many update packs between it and what you wanted and whether or not something in the latest version has caused changes to a rom for a game to not work with your system (ie. newer versions may require higher system specs due to addded features in the newer version and your system may not run as well using them due to it's age - which might be why you wanted a specific version prior to those additions.)
SO which fix is best will depend on your situation but from the sound of it (ie. Currently using 0.171 Mame and older (unknown version) romset) It would seem the easiest method for you would be either option 3 or 4. I say this because the newest version is readily available, since it is current and most seeders are either updating or have already updated so that download is the most active and quickest to get as older version seeders drop off making older sets slower to download and/or harder to find active. (as people upgrade their set to the newest they tend to no longer seed older versions since anyone can use the current version and the roll back set to create the set they want rather than having every older version active) - You might be able to find an active download for 0.171 or a close version where getting that set and updating if needed with the incremental update packs or downgrading the Mame version to match the set you find may be viable and fairly easy but then you will already be using an older version and might be missing some wanted additions.
If updating anyway it is easiest to find a method of getting the most recent release and then downgrading (roll back) to the older version if the system you are on needs that as then remaining current becomes easier as well since you can then just point the new download to your current romset folder and redownload from the current set only the roms that have been changed between your current version and the new download rather than having to download the entire set from scratch and you can seed the files you already have to others that do not have them yet helping the seeding of the torrent as well ( since most torrent programs can audit the download and only actually download files from the set that do not match the set you already have.) If you are redownloading the new set from a source that has the zip files arranged in the same method as the old set ( ie. creation dates on the files were not changed if they have not been changed between the latest version and the one you had downloaded before.) updating becomes a fairly quick and painless process.