Drupal 7 form missing from $form object during Ajax callback function
Just incase anybody wants to know the issue was I was trying to obtain a value from arg() and this was different for the ajax callback funtion. So in my hook_form function I set the following:

  // This is needed for the ajax callback
  if (arg(1) != 'ajax') {
    // We need to set the variable before we load the form.
    $form_state['value'] = arg(3);
    $key = arg(3);
  }
  else {
    // Ajax callback can now reference correct key.
    $key = $form_state['value'];
  }


This allowed me to obtain the correct value during the ajax callback function.