LPS-46289 Keeping the _references variable up to date, when serializing a new entity
LPS-46289 Implement test case for bug fix