Found two bugs! One of them was impossible for you to spot because I didn't post the code in which it was contained: I am a cell at [x][y][g]. I was considering [x][y][g - 1] to be a neighbour, but that is of course me! I am not my own neighbour.
The other bug was a bit embarrasing actually. I had left out rule number 2... >.<
I also realize I should have posted the rules of the Game of Life instead of assuming that you all know them or that you would bother researching them. It's a bit late now of course, but I'll post them anyway in case you are interested. Also, I really reccomend the wiki article for anyone interested in self-organization.
Rules:
- Live cells with < 2 live neighbours die, as if by loneliness.
- Live cells with > 3 live neighbours die, as if by overpopulation.
- Live cells with 2 || 3 live neighbours survive to the next generation.
- Dead cells with 3 live neighbours are revived, as if by reproduction.
Thank you for all input!