Make wrapped functors in internal_functional.h mutable

Fixes #516