Misc layered-rendering fixes.

Some of these are very ugly.