I'm not sure if you're still having this problem or not, but I recently had a similar issue using layer.replaceDataSource in a loop to replace SDE connections. It was only updating the first layer correctly but wouldn't update any other layers using the same SDE connection file. The solution that worked for me was to use arcpy.ClearWorkspaceCache_management() at the end of my loop prior to getting the next layer. Hope this helps, Bill
... View more