For mipmapped environment maps, create the mipmaps before calling bmap_to_cubemap (like bmap_to_cubemap(bmap_to_mipmap(skymap)). Creating mipmaps afterwards will produce an invalid environment map.
http://www.conitec.net/beta/abmap_to_cubemap.htmexpliciptly states, that one should create mipmaps before cubemaps and that doing so after creating cubemaps produces an invalid cubemap.
Which it does, if i do
bmap_to_mipmap(bmap_to_cubemap(skymap))
i get a black cubemap.