Fix overlay behaviors. Fix contextual links.

From #6520.