It's probably passing in "c" into the `getTotalBlocksInArea` method. Which is stupid.

Can you do a var_dump of $c in that function to see if it truly has access to the collection object or if it's a string "c"?