title: @SequenceGenerator allocationSize 'duplicate key error' issue
body: <p>I have a SequenceGenerator with an allocationSize of 5 (together with hibernate.id.new_generator_mappings=true). So from my understanding hibernate should try and return those values as new id:</p>
  
  <ol>
  <li><ul>
  <li>a) get the next value from the database sequence (e.g. id=70)</li>
  <li>b) subtract the allocationSize (70-5=65)</li>
  <li>c) return 65+1=66 as new id.</li>
  </ul></li>
  <li><p>return 67 as new id.</p></li>
  <li>return 68</li>
  <li>return 69</li>
  <li>return 70</li>
  <li>latest sequence value hit, so proceed with 1a)</li>
  </ol>
  
  <p>So the ids should range from 66 to 70. The problem in my case is that the generated ids are from 65 to 69. If I call next_value from within the database (postgres) and the sequence returns 65 i get a duplicate key error when hibernate generates 65 too afterwards (after getting 70 from the sequence).</p>
  
  <p>Any clues or help on this topic?</p>
  
  <p>€: Sorry, forgot to post my code:</p>
  
  <p>Generator:</p>
  
  <pre><code>@Id
  @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = GENERATOR_NAME)
  @SequenceGenerator(sequenceName = "hibernate_sequence", name = GENERATOR_NAME, allocationSize = 5)
  private Integer id;
  </code></pre>
  
  <p>Sequence (Postgresql):</p>
  
  <pre><code>CREATE SEQUENCE hibernate_sequence
    INCREMENT 5
    MINVALUE 1
    MAXVALUE 9223372036854775807
    START 10041865
    CACHE 1;
  </code></pre>