passing dynamic value in doIf

Hi,
I am trying to run the doIf statement with dynamic value but it does not work.

If i pass the static value it works.

.doIf("${myKey}", "myValue") {
   exec( http("...") ... ) // executed if the session value stored in "myKey" equals "myValue"
}

However if its a value from session attribute it is not working. Please let me know if i need to do something else for it to work?

.exec(session => session.set("sessionKey","sessionValue"))
.doIf("${myKey}", "${sessionKey}") {
   exec( http("...") ... ) // executed if the session value stored in "myKey" equals "myValue"
}

This is a regression/limitation in Gatling 2.1. It will be fixed in Gatling 2.2.