Now I see your logic. But there is a bug in your prefix logic.
Example: 
Query group by: col1, col0.
Index on (col0, col1, col2).

This will return true for replaceable. ?!