Revert "(util) Simplify EcoreHelper.getContainerOfType()"

This reverts commit 7e1f602b0a73c93152495436d452340eb4c7005a.