I fixed this case by adding both RegExp when required, even if it will never be used.