Fix ReplaySubject's double termination problem.

Fix for issue #1105