function_hooks: set implied states earlier
The bug here is that it was saving the implied states until the end and
then overwriting everything. Meanwhile, if a parameter was assigned
inside the function then that was getting over written with the original
implied states.
We do need to wait until all the PARAM_LIMIT conditions are parsed before
we set the implied states, because we want to preserve the implications
(which are stored in the implied sm states).
This calls set_implied_states() over and over now. I could add a flag to
only call it once or something, but that seems tricky and calling
set_implied_states() is a quick no-op so this is fine.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>