Prevents primary/foreign keys to not be recognized when case is different

Prevents primary/foreign keys to not be recognized due to different character case used (due to in_array() function doing case-sensitive comparison)

BTW: this PR should concern only commit  	8c37426.