Fix gaps method handling of periods outside self.