This is a band-aid that still doesn't guarantee the results will be correct in all cases. Instead, we should try out the idea of using -MD output with separate .d files for each object flavor.