Adding __block to silence clang's analyzer
Merging narrow functions by passing in comparison callback