This issue is related with the question I posted on StackOverflow.
I have no idea what a DataSpace does in EF. However, it seems that changing the DataSpace from a System.Data.Entity.Core.Metadata.Edm.DataSpace.CSpace to a System.Data.Entity.Core.Metadata.Edm.DataSpace.OSpace in method GetKeyNames solves my issue.
I suspect that changing it in GetEntitySetName as well might solve another issue I have: IncludeInPayload(true). I would like to do a quick test, but I can not override that method.
Thanks in advance for you inputs and comments.