Move assertion for index buffers only
Add some tests for indices handling