If you include any parameter into a custom function in the new Google Sheets (old one does not have this bug) which has a value equal to or greater than 10,000,000 an error occurs and the cell is stuck saying "Loading..."

Test spreadsheet: https://docs.google.com/spreadsheets/d/12lZJGwACNVnjVA4F0u32B6J65DmKn8lGaoR3qExRlEU/edit?usp=sharing
function Test1(val){
return val;
}
function Test2(ref){
return SpreadsheetApp.getActiveSheet().getRange(ref).getValue();
}
function Test3(){
return "Test3";
}
Test1 and even Test3 will fail if you use them in a cell's equation formula with a parameter to a cell with a value greater than 10,000,000. Test 3 does not even specify any parameters but it will still crash.
Test2 shows a work-around that can be used where a string reference such as "E3" can be passed as a parameter into the function and then the function will work fine for cells referenced with values greater than 10,000,000.
This seems to be a bug passing values to a custom-function rather than the processing of the custom functions.
Does anyone know if this is a known bug or if there is another work-around? The test2 workaround where I pass in a string-reference is not ideal as it does not automatically update if the referenced cell has changed.