further re-arrangement to enable version rewriting in gcube builds