$indexInstance = Registry::getRegistry()->getInstance($type . '_index');
} else {
// Get the handler instance
- $indexInstance = self::createObjectByConfiguredName($type . 'file_stack__index_class', array($fileName));
+ $indexInstance = self::createObjectByConfiguredName($type . '_file_stack_index_class', array($fileName));
+
+ // Add check for interface
+ assert($indexInstance instanceof IndexableStack);
// Add it to the registry
Registry::getRegistry()->addInstance($type . '_index', $indexInstance);