Fix bugs/warnings found by FindBugs in OpFlex code

Change-Id: If302f59c63c754e7af5b04ec40fbd1b152d1e624
Signed-off-by: Rob Adams <readams@readams.net>