Fixed StackAllocator tests bugs which were causing failures.