Added logic to make sure that expand doesn't mess with the contextual links. Oops.