[SOLVED] Moving to openHab 2: Errors for items in rules / Cannot reference the field XXX before it is defined

I am coming from openHab 1 and everything works fine.

As I am modifying rules files I got a lot of errors in the designer for openhab 2. The items assigned to tempSensor get the error “Cannot reference the field XXX before it is defined”. What is wrong?

var HashMap<String, LinkedHashMap<String, ?>> heatings =
newLinkedHashMap(
	"Thermostat_1" -> (
    	newLinkedHashMap(
    		"room" -> "Bad",
    		"roomItem" -> "Bath",
    		"tempSensor" -> Aeon_1_Temp
            )
        as LinkedHashMap<String, ?>),
    "Thermostat_2" -> (
    	newLinkedHashMap(
    		"room" -> "WoZi",
    		"roomItem" -> "Living",
    		"tempSensor" -> FibEye_2_Temp 
            )
        as LinkedHashMap<String, ?>),
    "Thermostat_3" -> (
    	newLinkedHashMap(
    		"room" -> "KiZi",
    		"roomItem" -> "Kids",
    		"tempSensor" -> FibEye_4_Temp 
            )
        as LinkedHashMap<String, ?>),
	"Thermostat_4" -> (
    	newLinkedHashMap(
    		"room" -> "ElZi",
    		"roomItem" -> "Parents",
    		"tempSensor" -> FibEye_3_Temp 
            )
        as LinkedHashMap<String, ?>),
	"Thermostat_5" -> (
    	newLinkedHashMap(
    		"room" -> "Küche",
    		"roomItem" -> "Kitchen",
    		"tempSensor" -> FibEye_1_Temp 
            )
        as LinkedHashMap<String, ?>),
	"Thermostat_6" -> (
    	newLinkedHashMap(
    		"room" -> "ArZi",
    		"roomItem" -> "Attic",
    		"tempSensor" -> FibEye_5_Temp 
            )
        as LinkedHashMap<String, ?>),
	"Thermostat_7" -> (
    	newLinkedHashMap(
    		"room" -> "GäZi",
    		"roomItem" -> "Attic",
    		"tempSensor" -> FibEye_5_Temp 
            )
        as LinkedHashMap<String, ?>)                      
)

Thanks for your help in advance!
HFM

I used the designer with version 0.7.0 which threw the errors. There were no errors while executing the code in log. Please try a newer snapshot.