In particular remove those build inputs that are already mentioned among the propagated build inputs. Fixes #10373.