This commit makes sure that profiles that have been explicitly enabled during AOT optimizations are automatically enabled when using those optimizations. If other profiles are set at runtime, they take precedence over the ones defined during AOT processing. Closes gh-30421