When encountering the use of an anchored key argument, MainPodBuilder will insert a Contains statement for the key that is being used, unless one has already been added to the current POD. However, this fails to account for the case where that Contains statement is already present as a public statement of an input POD, and therefore does not need to be created again.
Because there is no guarantee that the input POD will be added before the operation which uses the anchored key, it may make sense to switch to a de-duplication approach rather than attempting to track which Contains statements exist during operation insertion.