index_flush faild to handle "from" option when it's a lambda

Found a bug when using a lambda as from option. Small fix.