When two feature classes with the same name but different schemas are shared with a user with the SELECT privilege and published as a map service on ArcGIS Server 10.4.1 and 10.5, it refers to the wrong feature class in the published service.
This issue cannot be addressed within the current product support cycle. If the issue continues to affect the work in a supported release, contact Technical Support.