Fixed handleNewAndDeletedBranches for tags

This may affect other scenarios, but we noticed it most when we pushed tags to our Git server.