Fixed the backout case of creating a menu

Previously, providing arguments of the wrong type to (new menu) would cause a
seg fault due to an attempt to free the null pointer. This occurs because the
current index we are on is the failure and the cells that came before are
valid. This makes it necessary to clean it up and reclaim it before returning.
Otherwise we will leak memory.