check for casts of first argument to static extension (closes #2152)