Add unittest for 12540

~~Fixes https://d.puremagic.com/issues/show_bug.cgi?id=12540~~

~~I had to put the unittest in a version(unittest) block because forward referencing `Class12540` does not work inside of a `unittest {}` block (and there's no code to run here; the 'test' is just to ensure that this case compiles). ~~

Modified to only add a unittest for 12540.