Openhab 5.0: Possible inconsistent DSL language passing with Visual Studio?

Hi, I notice that in Openhab 5.0 the Visual Studio openhab plugin may handle DSL rule code inconsistently w.r.t. the DSL rule passing at startup (after a cache cleanup). In Visual Studio, the code checker prefers this DSL line:

var theItem = Switch_Items.members.findFirst\[itm|itm.name == triggeringItem.name.replaceFirst("(\_Power)$", "")\] as SwitchItem

While at startup, this gives an error and leads to unloading at first start. It prefers this version:

var theItem = Switch_Items.members.findFirst\[SwitchItem itm|itm.name == triggeringItem.name.replaceFirst("(\_Power)$", "")\]

Note, the first version above works after a restart of OH 5.1.1. Any ideas ?