If a constant has whitelisted methods, remove all non-whitelisted methods.