I have 2 solutions for you:
1: use onready:
onready var buildings = {'House':houses, 'Farm':farms}
2: fill the Dictionary in _ready:
var buildings : Dictionary
func _ready():
buildings["House"] = houses
buildings["Farm"] = farms
You have to get sure, that houses and farms are "loaded", before you assign them to something.