Fix index flags

`Index` does not consistently use the defined property `$_flags` throughout the flag methods. Therefore `Index::getFlags()` does not return the defined flags.