fix handling dependencies in ctypeswriter