Three level derived identity (against master)

A test case and some work towards a solution for https://hibernate.atlassian.net/browse/HHH-5764

See related pull request #751