Baking textures from procedural materials producing incorrect results

I was curious as to how game assets are made, so I went and tried baking a simple material on a rather simple model.

Here are (in order) my original material, material using baked texture, baked texture and baking settings. All mashed into one picture as I am a new user.

I also got a similarly broken texture when baking normals.

I don’t know if it’s an issue with how I’m doing it, or if I should report this behaviour as a bug. Any help appreciated.

.blend files say more than a thousand words, so I’m attaching it as well (hosting on my poor server as new users can’t upload attachments :frowning: ):