NISDDEV-5444 Fixing code to make miniprofiler work with ruby engines