Added an exists() function to the history for bug #4955.