Hello Michaël, yes, that's exactly what's gonna happen.
One workaround would be to create a new impure function, which does the map lookup, and has 2 output pins for the boolean and the element. This way, these are going to be cached.
The right solution would be something like this, built-in: https://twitter.com/geordiemhall/status/1180799087618084864