Merge "More termination conditions for Dreams." into jb-mr1-dev