Align dynamic import pre-checking more closely with the resolver itself; this makes it more accurate, but it is still not 100% accurate since it doesn't take into account resolver hooks. (FELIX-3766)