Your relations don't seem to be correct, they consist of 4 or 5 elements, one of which is apart from the others. Look at them here:
https://osm.org/relation/12996737
https://osm.org/relation/17462158

I suggest you re-read this page https://wiki.osm.org/wiki/Relation:restriction

Or look at this simple visual example, if you're having trouble understanding it all: https://wiki.osm.org/wiki/Relation:restriction#Prohibitory_restriction