Fix bugs related to invoking the Whiley runtime function.