Fix derived connection leak

Fixed a bug where derived signals were incorrectly tracking dependencies when read in untracked contexts like branch or root effects, causing spurious dependency connections. A test was added to prevent this regression.