Merge "Guard against incorrect context use." into oc-dev am: 2cddbcaa0f
am: d0c1cf630f

Change-Id: Ifb351d1693fe3d283abf78b2eea205f3d0544a0a