Prevent graph update within the same SSA expression

Added ssa update testcases