Prior to this commit, that behavior was not properly tested and inconsistent
between backends. All backends except in-memory were respecting it.
This commit aligns the in-memory backend implementation and test it.
It's the source of the current failure in D3273
Depends on D3277
Related to T2310