Only add successfully-loaded pages to History.

Change-Id: If5751b907f677e8d9b907fd08a4f5da0caf653f4