better handling of empty results in map (see #1274)