Fix variable scoping

Inheritance like that hasnt worked for ages, move to explicit
include and fully qualified lookup