Work in progress.

Perhaps mistakenly, replaced series of if with elseifs in
identifier resolution.