hook_init called a second time on ajax
You should really try to get to the bottom of why hook_init is being called twice, but for a band-aid solution, you can use a static variable (using drupal_static) to keep track of whether your implementation of hook_init has already been called.