Fix the grep call to only exclude lines that are exactly the PWD instead of containing it.
errc
git-rebase-add-stash