Buying slaves leads to error "$cashX is not a function"

Grepping for "$cashX" returns many occurrences (!3342 (merged) removes some of them).