test case to prevent duplicated associations with custom PK.

closes #9201