Possibly bug in active_record (or somewhere else)