BUG/MINOR: map: correctly track reference to the last ref_elt being dumped

The bug was introduced in the commit 8d85aa4 ("BUG/MAJOR: map: fix
segfault during 'show map/acl' on cli").

This patch should be backported to 1.8, 1.7 and 1.6.
1 file changed