Fix Instance.NextCommand() part 2.

NextCommand() should also return null on ErrorCode.OutOfRange.

Fixes #2