Added schema.indexedPaths() for looking up indexes on paths
#1668 Moved fix to cast operation
Updated tests