Group by layer rather than render/style (fixes #193)