Changed to recognise when a branch is behind.