Fixing a bug and a potential for other concurrency issues.

Fix for #1542.

the root cause of the issue was this line of code where it was casting the notification list object to T.
```
        private T getRecentValue() {
            return (T)value;
        }
```

While I was in there I noticed that is was a race condition between calling `hasNext()` and `next()` on the `Iterator`.