Fix directed substitution's case insensitivity