Fix issues with [] and add () around conditions to bullet-proof them.
Fix issues with [] and add () around conditions to bullet-proof them.

tpitale/dm-core,engineyard/dm-core,datamapper/dm-core,ar-dm/ardm-core,joevandyk/dm-core,tillsc/dm-core,alloy/dm-core