Bail using array_key_exists() in the remove_constant method instead of in_array().