The lambda instances used in these classes are capturing: subtly require allocations, while a little refactoring can avoid these.