Steps to reproduce:
Add a JPA object to a work-flow
Add an other JPA object to the work-flow with the same variable name
Request the object with the variable name from the work-flow
The first JPA object gets returned from the work-flow.
The 2nd object (latest version of the object for the variable name) added to the work-flow should be returned.
Set variable in work-flow to null first and set the new object in a 2nd call.
Test to reproduce this issue.