The Railgun constants are based on strings as the index. We could move the constants manager from https://raw.githubusercontent.com/rapid7/metasploit-framework/master/lib/rex/post/meterpreter/extensions/stdapi/railgun/api_constants.rb

to lib/rex/exploitation/windows/constants.rb or something like that, but that would require we then use 'CONSTANT_NAME' instead of CONSTANT_NAME which isn't quite so neat :)

Open to suggestions!