Prevent Nil array's when failing to encode
Moved the LastBlockSample delcaration line