core.c: Raise 'first_extraction' flag in case of SM state change

Signed-off-by: Ilya Nelkenbaum <ilyan@mellanox.com>