fix warnings when page contains short codes that are not interfaces

This a pretty significant algorithm change, but it looks like getting this algorithm correct is a good idea.