Switch orphan tracking to generalized stack framework.