added support for multiple indexing in the embedded Prolog engine