Fix some variable scoping issues in osm

node level is not top-level and class includes should come after
variable definition in node stanzas

Change-Id: I6edc1292851ea019eef3a5321c317187bca170af