When we add a record to a store the value in the keys array for the store does not have a proper id. For example, when the store is first loaded the keys are this:

keys: Array (4)
0: "283"
1: "277"
2: "278"

When we add a record using add() and sync() with a rest store the id is returned from the database insert to the record in the store, but the keys array now looks like this:

keys: Array (4)
0: "283"
1: "277"
2: "278"
3: "ext-record-72"

The record in the data array correctly has the id from the database insert, but it is not correctly set in the keys array. Since getById() uses the keys array it is unable to find the newly added record.