Improvements to handling of patched dependencies