More JPA concurrency fixes