Moved code for asserting index to remote module code.