Cleaned up handling of ApplyDynamic.