Test invoice sequence before accessing id

issue3199