The problem is that the request is generating by the API is incorrect, Tilerow parameter is wrong.
The request is being send is this. http://www.ign.es/wmts/ign-base?SERVICE=WMTS&VERSION=1.0.0&REQUEST=GetTile&LAYER=IGNBaseTodo&STYLE=default&FORMAT=image%2Fjpeg&TILEMATRIXSET=EPSG%3A25830&TILEMATRIX=18&TILEROW=236256&TILECOL=32268
And must be
Here is my code example. https://jsfiddle.net/rsjt5nma/1/ To reproduce the error one of the WMTSLayer must be selected from the select box.
There is a workaround to solve this problem?