Fix indexing bug in variable friction compatibility operation