Fix double commit on staged writes

- Detect double commit as an illegal state
- Remove double commit in component cache