Debugging potential issue with switching function implementation [WIP]

I have been working with Bill Swope and Julia Rice of IBM Alamden Research to run some tests they suggested, and these seem to point to a potential issue with the switching function implementation.  This PR is a work-in-progress (WIP) where I am starting by beefing up the unit test for the Reference platform, and then will tinker to see if there may actually be issues.

This is not yet ready to be merged.