Fixes #6274 added proper support for constants

This has potential backwards compatibility breaks as getProperty/getProperties will no longer returned constants.  Methods getConstant and getConstants must be used instead.

addProperty and addProperties are backwards compatible.