Throw error on sub mis-indexing (fix #39)