Merge "Fixed bug on pending environment use of termination condition. With regression test." am: 27fb1dc467 am: b0d6493751 am: 12fe024d25
am: 189b6bf38d

Change-Id: Ie04ceb44a2dc990832a6377bc988476f4a65728d