Make eshell-next-prompt more reliable (Bug#27405)