Fixed the build by resolving issues with a few of the tests, as well as adding some new tests for a more complete coverage of const-related functionality.