Patches defined in non-root composer.json files sometimes cause target projects to not be reinstalled

Filed issue:

https://github.com/cweagans/composer-patches/issues/277