Performance optimization for find_parameter_by_name

Made find_parameter_by_name only traverse parameters until it finds
the parameter it's looking for, as pointed out by Dougal on
I4e6c61527b16d8a0a7c1ca18c62327c8ee2cadbf.

Change-Id: Ifd5baeb1807b8343e5fc796db1a45b3a065ac96f
Merge "Performance optimization for find_parameter_by_name"