Notice: Use of undefined constant FIELD_LOAD_CURRENT
Discovered that this happens when you're executing this particular function outside of drupal being bootstrapped.

Source: https://drupal.org/node/1286964