Initial implementation of issue #2112

This is a first pass at the implementation of issue #2112, posted primarily to get early feedback.  The change is not ready to be merged, though it shouldn't break anything.

TODO:
- [x] Read through the code to sanity check everything in this commit.
- [x] Verify the rerender logic will force an update when the context information changes.
- [x] Add unit tests to test the new functionality.