Fix bug that processed buffers it shouldn't have.

All processing logic should be guarded by `utility#is_active()`.
Eliminate redundant argument.
Inline boolean logic.
Extract utility functions.