Diff generation bug fix

Generate and upload parent diff only when it's necessary.