Lightmap fixes

Addresses #1428 and an unrelated lightmap bug I noticed while looking for the first.