Evaluate first argument in is_record once
Merge pull request #1007 from ericmj/is_record

Evaluate first argument in is_record once