[RESEND PATCH 3.18-rc3 1/3] kdb: Fix a prompt management bug when using | grep