Fake divisor sum polyglots The task

In this challenge, your task is to write a program in a programming language L that takes a positive integer n, and outputs the sum of the proper divisors of n (sequence A001065 on OEIS).
It should return the correct output for any 1 &leq; n &le; 10 000.
Here are the first 10 outputs:

0, 1, 1, 3, 1, 6, 1, 7, 4, 8


Furthermore, your program must be a fake polyglot, which means the following.
It is a valid program in another programming language L', and for each input 1 &le; n &le; 10 (the test cases above), it returns the sum of proper divisors of n, but there exists some 11 &le; n &le; 10 000 for which it doesn't return the correct result.
It may return something incorrect, loop forever, crash etc.
It can give a wrong result for all n &ge; 11, for some of them or just one.

Rules and scoring

You can write a full program or a function, and you can have different means of input and output in the two languages.
The lowest byte count wins.
Standard code-golf rules apply.
In this challenge, different major versions or implementations of a language are considered distinct.

Note that if you use programming languages with non-ASCII encodings (as many do on this site), the same sequence of bytes must be used for both languages.
This means that you must either convert between potentially different code pages or suffer penalties for multi-byte Unicode characters.

Additional test cases

20 -&gt; 22
36 -&gt; 55
180 -&gt; 366
997 -&gt; 1
2875 -&gt; 869
10000 -&gt; 14211
JavaScript (ES6), V8 / SpiderMonkey vs Chakra, 66 63 bytes

n=&gt;[...Array(n)].map((_,d)=&gt;s+=n%d?0:d,[0,n&gt;10].sort(x=&gt;s=x))|s


Demo



let f =

n=&gt;[...Array(n)].map((_,d)=&gt;s+=n%d?0:d,[0,n&gt;10].sort(x=&gt;s=x))|s

console.log(JSON.stringify(
  [...Array(20)].map((_, n) =&gt; n + 1).map(f)
))




Output

Output of the above snippet on Chrome and Firefox (all correct):

[0,1,1,3,1,6,1,7,4,8,1,16,1,10,9,15,1,21,1,22]


Output on Edge (off by 1, starting at n = 11):

[0,1,1,3,1,6,1,7,4,8,2,17,2,11,10,16,2,22,2,23]


Why?

No algorithm is imposed by the specification for the .sort() method. It's not even required to be stable. Therefore, each JavaScript engine uses its very own implementation.

However, [0,1].sort(x=&gt;x) gives [0,1] with all engines.

So what's the difference?

What's happening here is that Chakra is passing 1 as the first parameter of the first (and only) iteration to the callback function (asking for a comparison of 1 with 0), while V8 and SpiderMonkey are passing 0 (asking for a comparison of 0 with 1).

You can use the following snippet to check what your browser is doing.



[0, 1].sort((x, y) =&gt; console.log("Let's compare " + x + " with " + y + "!"))