Fix various bugs along the way.
Needed for newer glslang. With Vulkan semantics for SPIR-V, all locations must be explicitly defined.