Test for map-loops inside functions