Small Optimization: Do not change the data type of `isDirty`

- Bitwise operators change the flag from Boolean to Number.
- JavaScript engines are faster when data types don't change.