Fix for a not-showing-bug (for expanded cores)

Similar to a previous bug (https://github.com/Khan/khan-exercises/pull/122815).

The variable `exercises` may contains multiple exercises with the same `id`, which causes problems when a core problem is expanded. For example, in issue https://github.com/Khan/khan-exercises/issues/129114, there is the id `multiple` in both divisibility_0.5 and comparing_fractions_2, so when it looks for the `original`, it sometimes can’t find it. The most straightfoward way to resolve the problem is to simply pass `exerciseId` in as a parameter to `makeProblem`.

An effort was made to make this backwards compatible, so `exerciseId` need not be passed in.