Improve getFree*ActiveObjectId to reduce common case cpu usage drasticaly