Fixed memory leaks from stack items not being destroyed after point removal. Closes #1044.