Refactoring: Remove redundant yield from stack_observer logic