Fix a bug in dependency generation.