Bugfix for oracle inputs, generate only for top-level equations