### Summary


we config the domain info with the `/etc/hosts` file, we monitor our service and change the domain with bash script like this:
```
ansible 127.0.0.1 -m blockinfile -a "block='192.168.1.1 test.company.com' marker='# {mark} : test block' path=/etc/hosts"
```
BUT , occasionally the file `/etc/hosts` contains multiple block. I expected that there should be only one block.

I have read the source code `lib/ansible/modules/files/blockinfile.py` and find nothing suspicious.


### Issue Type
~Bug  Report~
- Docs Report

### Component Name

blockinfile

### Ansible Version

```console
$ ansible --version
ansible 2.7.5.post0
  config file = /etc/ansible/ansible.cfg
  configured module search path = [u'/root/.ansible/plugins/modules', u'/usr/share/ansible/plugins/modules']
  ansible python module location = /usr/lib/python2.7/site-packages/ansible
  executable location = /usr/bin/ansible
  python version = 2.7.5 (default, Aug  7 2019, 00:51:29) [GCC 4.8.5 20150623 (Red Hat 4.8.5-39)]
```


### Configuration

```console
$ ansible-config dump --only-changed
COMMAND_WARNINGS(/etc/ansible/ansible.cfg) = False
HOST_KEY_CHECKING(/etc/ansible/ansible.cfg) = False
```


### OS / Environment

CentOS-7.6

### Steps to Reproduce

<!--- Paste example playbooks or commands between quotes below -->
```yaml (paste below)
ansible 127.0.0.1 -m blockinfile -a "block='192.168.1.1 test.company.com' marker='# {mark} : test block' path=/etc/hosts"
```


### Expected Results

```console
# BEGIN : test block
192.168.1.1 test.company.com
# END : test block
```

### Actual Results

```console
# BEGIN : test block
192.168.1.1 test.company.com
# END : test block
# BEGIN : test block
192.168.1.2 test.company.com
# END : test block
```


### Code of Conduct

- [X] I agree to follow the Ansible Code of Conduct
insertre = re.compile(to_bytes(insertafter, errors='surrogate_or_strict'))
    elif insertbefore not in (None, 'BOF'):
        insertre = re.compile(to_bytes(insertbefore, errors='surrogate_or_strict'))
    else:
        insertre = None
    marker0 = re.sub(b(r'{mark}'), b(params['marker_begin']), marker) + b(os.linesep)
    marker1 = re.sub(b(r'{mark}'), b(params['marker_end']), marker) + b(os.linesep)
    if present and block:
        if not block.endswith(b(os.linesep)):
            block += b(os.linesep)
        blocklines = [marker0] + block.splitlines(True) + [marker1]
    else:
        blocklines = []
    n0 = n1 = None
    for i, line in enumerate(lines):
        if line == marker0:
            n0 = i
        if line == marker1:
            n1 = i
    if None in (n0, n1):
        n0 = None
        if insertre is not None:
            if insertre.flags & re.MULTILINE:
                match = insertre.search(original)
                if match:
                    if insertafter:
                        n0 = to_native(original).count('\n', 0, match.end())
                    elif insertbefore:
                        n0 = to_native(original).count('\n', 0, match.start())
            else: