Sounds like I forgot to subtract one from the available bodies if you place one. I thought I noticed that from Joshua's stream as well.
If you want to make something like this, I can share you the code. It's C++, and it's not all well written. But it's not horrible to read/understand.