Additional info: the code does work when the input data are placed into a File Geodatabase (not in a Personal GDB!)
moving data to fgdb indeed fixed the problem. I've tried to export data back to shapefile and the test passed. It seems that export/import function fixed the data but I don't how.
I still have my issue as I'd like to avoid the export phase...