Fix IE8 issue with Record and throw when setting an invalid key