ssa.c: Refactor ssa_upstream_dev_even function.