Added environment mapping of some ast headers such that the right
constructor can be used to build vm asts.
Fixed python codec to deal with environment references.